// sdk.cpp - 实现文件
#include "sdk.h"
#include <iostream>

class Sdk::Impl {
public:
    std::string config;
    std::string result;
    bool initialized = false;
};

Sdk::Sdk() : pImpl(std::make_unique<Impl>()) {}

Sdk::~Sdk() = default;

Sdk::Sdk(Sdk&&) noexcept = default;
Sdk& Sdk::operator=(Sdk&&) noexcept = default;

void Sdk::initialize(const std::string& config) {
    pImpl->config = config;
    pImpl->initialized = true;
    std::cout << "SDK initialized with config: " << config << std::endl;
}

bool Sdk::processData(int data) {
    if (!pImpl->initialized) return false;
    pImpl->result = "Processed: " + std::to_string(data);
    return true;
}

std::string Sdk::getResult() const {
    return pImpl->result;
}